<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改车位档案</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
</head>
<body>
<form id="form" action="${path}/carport/update.json" method="post">
<div class="form">
	<div class="group">
		<div class="label">*车位编号:</div>
		<div class="item"><input type="text" name="carportCode" id="carportCode" value="${carport.carportCode }" /></div>
	</div>
	<div class="group">
		<div class="label">状态:</div>
		<div class="item">
			<input type="radio" id="status0" name="status" value="0" ${carport.status==0?'checked="checked"':'' } /><label for="status0" class="label">空置</label>
			<input type="radio" id="status1" name="status" value="1" ${carport.status==1?'checked="checked"':'' } /><label for="status1" class="label">在用</label>
		</div>
	</div>
	<div class="group">
		<div class="label">房间编号:</div>
		<div class="item"><input type="text" name="roomCode" id="roomCode" value="${carport.roomCode }" /></div>
	</div>
	<div class="group">
		<div class="label">合同起始日期:</div>
		<div class="item"><input type="text" name="beginTime" id="beginTime" ltype="date" value="<fmt:formatDate value="${carport.beginTime }" pattern="yyyy-MM-dd" />" /></div>
	</div>
	<div class="group">
		<div class="label">合同结束日期:</div>
		<div class="item"><input type="text" name="endTime" id="endTime" ltype="date" value="<fmt:formatDate value="${carport.endTime }" pattern="yyyy-MM-dd" />" /></div>
	</div>
	<div class="group">
		<div class="label">联系人姓名:</div>
		<div class="item"><input type="text" name="linkman" id="linkman" value="${carport.linkman }" /></div>
	</div>
	<div class="group">
		<div class="label">联系人电话:</div>
		<div class="item"><input type="text" name="linktel" id="linktel" value="${carport.linktel }" /></div>
	</div>
	<div class="group">
		<div class="label">联系人手机:</div>
		<div class="item"><input type="text" name="linkphone" id="linkphone" value="${carport.linkphone }" /></div>
	</div>
	<div class="group">
		<div class="label">使用车牌号:</div>
		<div class="item"><input type="text" name="carCode" id="carCode" value="${carport.carCode }" /></div>
	</div>
	<div class="group">
		<div class="label">使用面积:</div>
		<div class="item"><input type="text" name="area" id="area" value="${carport.area }" /></div>
	</div>
	<div class="group">
		<div class="label">备注:</div>
		<div class="item"><textarea id="remark" name="remark">${carport.remark }</textarea></div>
	</div>
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
		<input type="hidden" id="carportid" name="carportid" value="${carport.carportid }" />
	</div>
</div>
</form>
<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript">
$(function() {
	$("#form").ligerForm({inputWidth: 300});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "修改车位档案成功", function(){
				UiUtil.closeForm(true);
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
	});
	
});
</script>
</body>
</html>